import { get, post, del } from "../utils/request";

export const loadPaoAPI = (data) =>
  get("http://192.168.15.6:3006/medicines", data);

export const loadxiangqingAPI = (id) =>
  get("http://192.168.15.6:3006/medicines/" + id);

export const loadChangjianAPI = () =>
  get("http://192.168.15.6:3006/illnesses/standing_medicines");

//获取所有医生信息
export const loadDoctorsAPI = () =>
  get("http://192.168.15.6:3006/doctors?per=10&page=1");

//获取单个医生信息
export const loadxisheng = (id) =>
  get("http://192.168.15.6:3006/doctors/" + id);

//退出登录

// export const tuichuAPI = () =>
//   get("http://192.168.15.6:3006/auth/manager_logoutv");

//加入购物车
export const addjiaruAPI = (amount, medicine, price) =>
  post("http://192.168.15.6:3006/members/shop_carts", {
    amount,
    medicine,
    price,
  });

//获取购物车数据
export const loadcartAPI = () =>
  get("http://192.168.15.6:3006/members/shop_carts");

//删除多个
export const delFromCartAPI = (id) => del("/members/shop_carts?id=" + id);

//关注医生
export const guanzhuAPI = (data) => post("/members/doctor_collection", data);
